ENT-13277: Adjusted detection of systemd in package scriptlets to handle more valid states#1989
Conversation
8ef9f5b to
dc10082
Compare
|
@cf-bottom jenkins please with exotics |
|
Alright, I triggered a build: (with exotics) Jenkins: https://ci.cfengine.com/job/pr-pipeline/12848/ Packages: http://buildcache.cfengine.com/packages/testing-pr/jenkins-pr-pipeline-12848/ |
dc10082 to
e0f7c16
Compare
|
beautiful green! will manually test/inspect. |
nickanderson
left a comment
There was a problem hiding this comment.
OK, so use systemd if systemctl exists and if systemctl is-system-running returns a non empty string that is not offline or unknown.
|
little snag. In a debian container with systemd installed and systemctl is-system-running reporting offline I still get some errors installing: and looking at /var/log/CFEngine-Install.log I see it quit on So it seems platform_service needs work. Will do. |
b9ef1be to
6368c72
Compare
…lid states
In the case where a package is installed but not bootstrapped several of the components: cf-execd, cf-monitord, cf-serverd will not be able to start due to lack of ${sys.inputs}/promises.cf.
This will cause the `systemctl is-system-running` command to return `degraded` and a non-zero exit code.
Previously this would cause the cfengine3 service to not be enabled as part of the package install and so on reboots services would not be running.
Ticket: ENT-13277
Changelog: title
6368c72 to
19ccbed
Compare
|
I had to refactor a bit as the script-common.sh wasn't so "common" aka the (rpm|deb)-script-common.sh scripts relied on bits inside there but script-common.sh relied on bits inside of them so I created a new script: script-header.sh which comes first and contains the use_systemd function to use in many places. |
|
this was merged to master before 3.27.0 so only picked to 3.24.x: #2192 |
In the case where a package is installed but not bootstrapped several of the components: cf-execd, cf-monitord, cf-serverd will not be able to start due to lack of ${sys.inputs}/promises.cf.
This will cause the
systemctl is-system-runningcommand to returndegradedand a non-zero exit code.Previously this would cause the cfengine3 service to not be enabled as part of the package install and so on reboots services would not be running.
Ticket: ENT-13277
Changelog: title